﻿<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="MayorPrecedencia.aspx.vb" Inherits="Reportes_MayorPrecedencia" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">




    <div style="text-align: center;">
    
        <asp:Label ID="Label1" runat="server" Text="LUGARES DE MAYOR PROCEDENCIA"></asp:Label>
    
        <br />
        <br />
        <br />
    
    </div>
        <div  style="text-align: center;">
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BackColor="White" BorderColor="#336666" BorderStyle="Double" BorderWidth="3px" CellPadding="4" DataSourceID="SqlDataSourceMayorPrecedencia" GridLines="Horizontal">
                <Columns>
                    <asp:BoundField DataField="Ranking" HeaderText="Ranking" ReadOnly="True" SortExpression="Ranking" />
                    <asp:BoundField DataField="nombre" HeaderText="nombre" SortExpression="nombre" />
                </Columns>
                <FooterStyle BackColor="White" ForeColor="#333333" />
                <HeaderStyle BackColor="#336666" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#336666" ForeColor="White" HorizontalAlign="Center" />
                <RowStyle BackColor="White" ForeColor="#333333" />
                <SelectedRowStyle BackColor="#339966" Font-Bold="True" ForeColor="White" />
                <SortedAscendingCellStyle BackColor="#F7F7F7" />
                <SortedAscendingHeaderStyle BackColor="#487575" />
                <SortedDescendingCellStyle BackColor="#E5E5E5" />
                <SortedDescendingHeaderStyle BackColor="#275353" />
            </asp:GridView>
            <asp:SqlDataSource ID="SqlDataSourceMayorPrecedencia" runat="server" ConnectionString="<%$ ConnectionStrings:TESTConnectionString2 %>" SelectCommand="SELECT RANK() OVER(ORDER BY COUNT(*)) Ranking, p.nombre FROM Libro h INNER JOIN Cliente c ON h.ClienteId = 
c.Documento INNER JOIN Provincia p ON p.code = c.provincia GROUP BY p.nombre ORDER BY Ranking "></asp:SqlDataSource>
        </div>
</asp:Content>
